package com.team.runsfast.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("t_scorelog")
@NoArgsConstructor
public class ScoreLog {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Long uid;
    private Integer type; //1.获得积分  2.消费积分
    private String info;// 积分详情
    private double score; // 积分
    private Date ctime; // 创建时间

    public ScoreLog(long uid, Integer type, String info, double score) {
        this.uid = uid;
        this.type = type;
        this.info = info;
        this.score = score;
        this.ctime = new Date();
    }
}
